<?php
$rs_grp_view = groupList($siteID);
$rs_grp_view1 = $rs_grp_view;
$row_rs_grp_view = mysql_fetch_assoc($rs_grp_view);
$row_rs_grp_view1 = $row_rs_grp_view;

$totalRows_rs_grp_view = mysql_num_rows($rs_grp_view);
?>

<ul id="groupViewTab" class="shadetabs">
    <li><a href="#" rel="tc_gm" class="selected">Group Members </a></li>
    <li><a href="#" rel="tc_g" >Group  </a></li>
</ul>

<div>
    <div id="tc_gm" class="tabcontent">
        <select name="group" id="group" onchange="getData('pages/group_member_search.php?aj&grp='+this.value,'grpview')">
<?php do { ?>
                <option value="<?php echo $row_rs_grp_view1['category_id']; ?>"><?php echo $row_rs_grp_view1['category_name']; ?></option>
<?php } while ($row_rs_grp_view1 = mysql_fetch_assoc($rs_grp_view1)); ?>
        </select>

<form method="post" action="" id="frmgroupView">
        <input type="submit" name="button2" id="button2" value="Delete" onclick="document.getElementById('frmaction').value='delete';return confirm('Do YOU really want to delete this Item as it might delete other sub Item');" />
        <input type="hidden" name="frmaction" id="frmaction" />
        <input name="frmCont" type="hidden" id="frmCont" value="group_mem" />
      <input name="chkprefix" type="hidden" id="chkprefix" value="delchk" />
        <div id="grpview"></div>
</form>    </div>
    <div id="tc_g" class="tabcontent">

        <a href="pages/category_add.php?aj&pid=<?php echo $Site_Group; ?>" rel="facebox">Add Group</a>
        <table border="0" cellpadding="3" cellspacing="3" id="datatable">
            <tr>
                <td>category_id</td>
                <td>category_name</td>
            </tr>
<?php do { ?>
            <tr>
                <td><?php echo $row_rs_grp_view['category_id']; ?></td>
                <td><a href="pages/category_update.php?aj&itemid=<?php echo $row_rs_grp_view['category_id']; ?>" rel="facebox"><?php echo $row_rs_grp_view['category_name']; ?></a></td>
            </tr>
<?php } while ($row_rs_grp_view = mysql_fetch_assoc($rs_grp_view)); ?>
        </table>
    </div>
</div>
<script type="text/javascript">
    getData('pages/group_member_search.php?aj&grp='+document.getElementById("group").value,'grpview');
    var gvt=new ddtabcontent("groupViewTab") //enter ID of Tab Container
    gvt.setpersist(true) //toogle persistence of the tabs' state
    gvt.setselectedClassTarget("link") //"link" or "linkparent"
    gvt.init()
</script>
<?php
        mysql_free_result($rs_grp_view);
?>